package com.zh.common.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@ApiModel("菜单实体类")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("elec_menu")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ElecMenu extends Model<ElecMenu> {

  private static final long serialVersionUID = -7011139237641723663L;

  @ApiModelProperty(value = "主键", name = "id")
  private Long id;
  @ApiModelProperty(value = "菜单名", name = "menuName")
  @TableField(value = "menu_name")
  private String text;
  @ApiModelProperty(value = "菜单路径", name = "menuPath")
  @TableField(value = "menu_path")
  private String link;
  @ApiModelProperty(value = "创建日期", name = "menuDate")
  @TableField(value = "menu_date")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date menuDate;
  @ApiModelProperty(value = "排序顺序", name = "menuOrder")
  @TableField(value = "menu_order")
  private Integer menuOrder;
  @ApiModelProperty(value = "菜单icon", name = "menuIcon")
  @TableField(value = "menu_icon")
  private String icon;
  @ApiModelProperty(value = "创建人编号", name = "menuOp")
  @TableField(value = "menu_op")
  private String menuOp;
  @ApiModelProperty(value = "菜单描述", name = "menuDes")
  @TableField(value = "menu_des")
  private String menuDes;
  @ApiModelProperty(value = "上级菜单id", name = "menuId")
  @TableField(value = "pid")
  private Long pid;
  @ApiModelProperty(value = "菜单深度", name = "menuLevel")
  @TableField(value = "menu_level")
  private Integer menuLevel;
  @ApiModelProperty(value = "国际化", name = "menuI1n8")
  @TableField(value = "menu_i1n8")
  private String i1n8;
  @ApiModelProperty(value = "是否显示分组名(true显示)", name = "group")
  @TableField(exist = false, select = false)
  private Boolean group;
  @ApiModelProperty(value = "隐藏面包屑(true隐藏)", name = "hideInBreadcrumb")
  @TableField(exist = false, select = false)
  private Boolean hideInBreadcrumb;
  @ApiModelProperty(value = "菜单集合", name = "children")
  @TableField(exist = false, select = false)
  private List<ElecMenu> children;
  @ApiModelProperty(value = "角色编号", name = "roleId")
  @TableField(select = false)
  private Long roleId;
  @ApiModelProperty(value = "用于记录删除菜单的日志", name = "des")
  @TableField(select = false)
  private String des;
  @ApiModelProperty(value = "逻辑删除字段", name = "deleted")
  @TableLogic
  @TableField(select = false)
  private Integer deleted;


}
